package com.pilipala.utils;

import com.pilipala.constant.CodeConstant;

import java.security.SecureRandom;

public class CodeUtil {

    public static String generateNumberCode(){
        SecureRandom random = new SecureRandom();

        StringBuilder sb = new StringBuilder();
        for (int i = 0;i < CodeConstant.CODE_LENGTH;i++){
            sb.append(random.nextInt(10));
        }

        return sb.toString();
    }
}
